<?php
session_start();

// set PAGETYPE
$PAGETYPE='LIST';

// includes
	include_once "%connectinclude%";
	include_once "CF_pdo_com.php";
	include_once "CF_class_com.php";
	include_once "%fieldinclude%";

// define custom class
	class %class_name% extends %class_base_name% {
	
	
	
	}
// Use class instance
	$%list_table_instance% = new %class_name%($fieldspec, $testtable);
	$%list_table_instance%->set_name('%cs_name%');
	$%list_table_instance%->set_actionpage("%process_page%");
	$%list_table_instance%->set_selfpage("%list_page%");
	
	// uncomment and specify for tables with edit page
	//$%list_table_instance%->set_editpage("edit_test.php");

	$%list_table_instance%->get_filter_vals();
	%no_paging%$%list_table_instance%->get_pagination();
	
	$qry_list = "%str_query% " %str_qry_filter% %str_qry_sort% %str_row_limit% ;
	print $qry_list;
	
	$array_list = get_array_query($qry_list);
	
	$%list_table_instance%->set_valuesarray($array_list);
	$%html_table_name% = $%list_table_instance%->maketable();

	
	?>
	
<html>

<head>
	<title>%cs_name% list</title>
	<link rel="stylesheet" href="commonctls.css" type="text/css">
	<script language="javascript"  type="text/javascript">

	url_syncval = "%process_page%";
	keyvariables = '%str_key%';
	tablename = '%cs_name%'

		
	</script>
	<!-- yui libraries for ajax sync -->
	<script src="%backdirectory%yui/build/yahoo/yahoo.js"></script>
	<script src="%backdirectory%yui/build/event/event.js"></script>
	<script src="%backdirectory%yui/build/connection/connection.js"></script>
	<script src="%backdirectory%%class_subpath%ajtable.js"></script>
	<script src="%backdirectory%%class_subpath%CFmultiselect.js"></script>
	</head>

<body onload="statusPrint('')";>
<?php //print $testtable->get_filter_vals();
//print "THIS IS DEBUG STUFF:<BR>\n";
//print_r($testtable->filters);
//print "Session: ";
//print_r($_SESSION);
//print " <br>";
//print "Request: ";
//print_r($_REQUEST);
//print "<br>\nEND DEBUG<br>\n";
 //$testtable->make_query_filter()
 ?>
<?php %no_filter%print $%list_table_instance%->make_filters_box() ?>
<br\>
<table name='%cs_name%' id='%cs_name%'>
<thead>
<?php %no_sort%print $%list_table_instance%->make_sort_heading(); ?>
</thead>
<tbody>
<?php print $%list_table_instance%->maketable() ?>
</tbody>
</table>
<br/>
<?php print $%list_table_instance%->make_apply_all() ?>
<br/>
<table>
<?php print $%list_table_instance%->make_multi_act_row() ?>
</table>
<br/>
<?php print $%list_table_instance%->make_add_box('keys') ?>
<span name="status_text" id="status_text">
Warning - Low JavaScript Fuctionality.  Please Enable Javascript, or (if it is enabled), use a newer browser
</span>
<span name="debug_text" id="debug_text">
Debug Here
</span>
<hr/>
Simple Table Test</br>
<table>
<?php print $simple_text ?>
</table>
</body>